using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public enum eTerminaType
{
    None = 0,
    Mobile = 1,
    Computer = 2,
}


// 终端接口,能接收并处理数据
public class Termina : IElementBase
{
    public string TerminaName { get; set; }
    
    public eTerminaType TerminaType { get; set; }

    public virtual string ReceivedData(string data)
    {
        var str = $" {TerminaName} 收到外设消息 {data} ";
        return str;
    }

    public string GetElementName()
    {
        return TerminaName;
    }
}

public class Phone : Termina
{
    public Phone()
    {
        TerminaName = "IPhone";
        TerminaType = eTerminaType.Mobile;
    }
}

public class HuaweiPhone : Termina
{
    public HuaweiPhone()
    {
        TerminaName = "HuaweiPhone";
        TerminaType = eTerminaType.Mobile;
    }
}


public class Computer : Termina
{
    public Computer()
    {
        TerminaName = "IMAC";
        TerminaType = eTerminaType.Computer;
    }
    
}